function widget:GetInfo()
  return {
    name      = "Shadow Map",
    desc      = "GLSL implementation of shadow maps",
    author    = "Albert Liu",
    date      = "25 October 2009",
    license   = "MIT",
    layer     = 0,
    enabled   = false  --  loaded by default?
  }
end

local shaderDir = LUAUI_DIRNAME .. "Shaders/"
local vertexShaderFilename = shaderDir .. "shadow.vert"
local fragmentShaderFilename = shaderDir .. "shadow.frag"

local Echo = Spring.Echo

local shader

function widget:Initialize()
  local file = io.open(vertexShaderFilename)
  local vertexShaderCode = io.read(code, "*a")
  io.close(file)
  
  local file = io.open(fragmentShaderFilename)
  local fragmentShaderCode = io.read(code, "*a")
  io.close(file)
  
  shader = gl.CreateShader({
    vertex = vertexShaderCode,
    fragment = fragmentShaderCode,
  })
  
  if not shader then
    Echo(gl.GetShaderLog())
    widgetHandler:RemoveWidget()
  end
end

function widget:Shutdown()
  if shader then
    gl.DeleteShader(shader)
  end
end

function widget:DrawWorld()
  glUseShader(shader)

  glDepthTest(true)
end
